﻿using System;
using System.Runtime.Serialization;

namespace EvidenceManagement.Model
{
    [DataContract]
    [DbObject(SelectCommandText = "Person_Select"
        , InsertCommandText = "Person_Insert"
        , DeleteCommandText = "Person_Delete"
        , UpdateCommandText = "Person_Update")]    
    public class Person : IAuditable
    {
        public Person()
        {
        }

        [DbColumn][DataMember]        
        public string FirstName
        {
            get;
            set;
        }
        [DbColumn][DataMember]
        public string Surname
        {
            get;
            set;
        }
        [DbColumn][DataMember]
        public string MiddleName
        {
            get;
            set;
        }
        [DbColumn][DataMember]
        public string Initials
        {
            get;
            set;
        }
        [DbColumn][DataMember]
        public string IdentityNumber
        {
            get;
            set;
        }

        [DbColumn][DataMember]
        public int Age
        {
            get;
            set;
        }

        [DbColumn][DataMember]
        public Guid PersonID
        {
            get;
            set;
        }

        [DbColumn][DataMember]
        public DateTime DateOfBirth
        {
            get;
            set;
        }

        public Guid GenderID
        {
            get;
            set;
        }

        public Guid RaceID
        {
            get;
            set;
        }

        public Guid ContactDetailID
        {
            get;
            set;
        }

        public Guid ResidentialAddressID
        {
            get;
            set;
        }

        public Guid IdentityTypeID
        {
            get;
            set;
        }

        #region IAuditable Members

        [DbColumn][DataMember]
        public Guid CreatedBy
        {
            get;
            set;
        }

        [DbColumn][DataMember]
        public Guid ModifiedBy
        {
            get;
            set;
        }

        public bool IsDeleted
        {
            get;
            set;
        }

        #endregion
    }
}
